<script setup>

defineProps({
    title: {
        required: true,
        type: String,
    }
})
</script>


<template>
    <el-card class="page-container" shadow="hover">
        <template #header>
            <div class="header">
                <span>{{ title }}</span>
                <div class="extra">
                    <slot name="extra"></slot>
                </div>
            </div>
        </template>
        <slot></slot>
    </el-card>
</template>

<style lang="scss" scoped>
.page-container {
    padding: 20px;
    .header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 18px;
        font-weight: 500;
        margin-bottom: 20px;
        .extra {
            margin-left: auto;
        }
    }
}
   
</style>